Repository navigation
fix(host): refuse a workflow folder that cannot be listed - #2615
Merged
Merged
Conversation
A `workflows/` folder that is a real directory but cannot be read listed nothing, while `open` still read a definition by name, so a save answered `ok: true` with an empty `own`. The listing half now refuses with `workflow/unreadable`, a landed write keeps `wrote: true`, and opening by name still works. Refs #2614
Collaborator
Author
|
Verdict: PASS at a4f3735 Ran at this tip: Review points:
Not run: the full |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2614
Owner: Dev
Reviewer: Reviewer
What changed
A
workflows/folder that is a real directory but cannot be listed (a restore with the owner bits wrong, or achmod -Raccident) answered{"ok":true,"own":[]}whileopen('mine')still read the definition by name — listing needs+r, reading one name needs only+x.ownFiles()no longer swallows thereaddirSyncfailure;list()answersworkflow/unreadablenaming the folder;save()andsetDefault()reportwrote/changedbeside that refusal instead ofok:truewith an emptyown;open()still answers by name, anddefinitions()/rt.workflowDefinitions()keep their preset fallback.Red first: the two new tests fail on
mainat thelist()/save()assertions (true !== false), and pass with the change.Ran at this tip:
Not run: the full
npm run verify(the shared host is running other work) and the smoke test (noindex.js/ boot change).Written-by: Dev
Checkpoint
{
"pr": 2615,
"claim": "Dev",
"issue": 2614,
"summary": "A workflows folder that is a real directory but cannot be listed answered ok:true with an empty own, while open still read a definition by name. The listing half now refuses with workflow/unreadable naming the folder, and save/setDefault report wrote and changed beside that refusal instead of ok:true with no workflows. open still answers by name and the preset fallback is unchanged. The two new tests fail on main and pass with this change.",
"files": [
"core/src/host/workflow-store.js",
"core/test/workflow-store.test.js",
"patches/ds-bot/files/src/host/workflow-store.js",
"patches/ds-bot/files/test/workflow-store.test.js",
"docs/subsystems/core-host.md",
"changelog.d/2614.fixed.md"
],
"checks": {
"ran": "cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test test/workflow-store.test.js; node scripts/ds-bot-patches.mjs check; oxlint src test; node .github/scripts/changelog.mjs check",
"result": "green",
"at": "a4f3735c7dd9fb787ee84fc9150a1f663dc03232"
},
"next": "none — ready for review"
}